Any electronics experts in the house?

Kinja'd!!! "Full of the sound of the Gran Fury, signifying nothing." (granfury)
04/28/2020 at 09:48 • Filed to: None

Kinja'd!!!0 Kinja'd!!! 5
Kinja'd!!!

Is there anything special about using or interfacing simple rotary encoders, like the EC11? I’m thinking of making a flight simulator autopilot/radio controller and was contemplating using REs in place of SPDT switches. The REs or switches would just be wired up to a USB board of some sort, like the guts of an old multi-button joystick or similar board I've  seen on eBay.


DISCUSSION (5)


Kinja'd!!! JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t > Full of the sound of the Gran Fury, signifying nothing.
04/28/2020 at 10:47

Kinja'd!!!0

Rotary encoders come in a couple different types, the most common being A-B differential encoders, AKA Quadrature encoders  (The EC11-type encoders are A-B differential). Here’s a couple tutorials about using encoders with Arduino boards. The same principles apply for other GPIO type interfaces. (eg: xxxPie, STM32, Arm0, etc) depending on how you are interfacing them you may or may not need to write your own library.

https://www.seeedstudio.com/blog/2020/01/19/rotary-encoders-how-it-works-how-to-use-with-arduino/

http://arduinolearning.com/code/arduino-rotary-encoder-example.php


Kinja'd!!! Full of the sound of the Gran Fury, signifying nothing. > JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t
04/28/2020 at 21:30

Kinja'd!!!0

Worst case scenario I was going to use a $35 board like this: https://www.iflysims.com/16_Rotary.html

but I was hoping to use a simple, cheap board like this (which I already have) :

Kinja'd!!!

https://www.ebay.com/itm/usb-joystick-controller-i-o-pcb-board-arcade-game-part-cf4-54/153587524120?hash=item23c287a218:g:j34AAOSwgnFdQw-G

I was assuming that I could just use a rotary encoder in place of two switches; if that were the case one of these cheap 12-button controller boards c ould be used to connect 6 rotary encoders, if the output of the RE could simply be used to act like the pressing of a momentary button. I’ll have to dig around to see if I have any REs, but if not I may have to try using the volume control of a dead stereo receiver laying around that I was tempted to turn into a HTPC.


Kinja'd!!! JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t > Full of the sound of the Gran Fury, signifying nothing.
04/28/2020 at 21:42

Kinja'd!!!1

for about $6 you can get an STM32 (or other Arm CPU) board, which can pretend to be a USB HID device, will take all your inputs, and even some outputs and let you build a full cockpit with radios (with displays) and such... much of the code has already been written, and there are even custom PCB plans.

https://create.arduino.cc/projecthub/Sam86/flight-simulator-custom-controls-b40f08


Kinja'd!!! Full of the sound of the Gran Fury, signifying nothing. > JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t
04/28/2020 at 21:46

Kinja'd!!!0

What does it take to program an ST32? Is it a standalone unit, or do I need to connect it to an Arduino of some sort?


Kinja'd!!! JawzX2, Boost Addict. 1.6t, 2.7tt, 4.2t > Full of the sound of the Gran Fury, signifying nothing.
04/28/2020 at 21:54

Kinja'd!!!0

An STM32, in raw form will require a serial to USB cable to program, but there are a number of pre-built hobby boards that include a USB interface and firmware driver... I still would re comm end getting an USB to Serial cable because the Open Source firmware available for the microcontroller is MUCH better than any of the commercial versions, and you need serial to overwrite the factory firmware. It’s not too difficult and the boards are fairly fault tolerant.